# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'main_window.ui'
# (Manually cleaned for better readability)

from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 600)

        # 1. 创建中心部件
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")

        # 2. 创建主布局 (一个水平布局，用于分割左右区域)
        self.main_horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
        self.main_horizontalLayout.setObjectName("main_horizontalLayout")

        # --- 3. 构建左侧垂直布局 (用于输入控件) ---
        self.left_verticalLayout = QtWidgets.QVBoxLayout()
        self.left_verticalLayout.setObjectName("left_verticalLayout")

        # 3a. 创建网格布局用于标签和输入框
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        
        self.label = QtWidgets.QLabel() # 创建时无需指定父控件
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        
        self.month_combo = QtWidgets.QComboBox()
        self.month_combo.setObjectName("month_combo")
        self.gridLayout.addWidget(self.month_combo, 0, 1, 1, 1)
        
        self.label_2 = QtWidgets.QLabel()
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)

        self.time_input = QtWidgets.QLineEdit()
        self.time_input.setObjectName("time_input")
        self.gridLayout.addWidget(self.time_input, 1, 1, 1, 1)

        # 3b. 将网格布局、按钮和文本框依次添加到左侧垂直布局中
        self.left_verticalLayout.addLayout(self.gridLayout)
        
        self.query_button = QtWidgets.QPushButton()
        self.query_button.setObjectName("query_button")
        self.left_verticalLayout.addWidget(self.query_button)
        
        self.result_display = QtWidgets.QTextEdit()
        self.result_display.setObjectName("result_display")
        self.left_verticalLayout.addWidget(self.result_display)

        # 3c. 将构建好的左侧布局添加到主水平布局中
        self.main_horizontalLayout.addLayout(self.left_verticalLayout)

        # --- 4. 构建右侧垂直布局 (用于绘图区域) ---
        self.right_verticalLayout = QtWidgets.QVBoxLayout()
        self.right_verticalLayout.setObjectName("right_verticalLayout")
        
        self.plot_widget_1 = QtWidgets.QWidget()
        self.plot_widget_1.setObjectName("plot_widget_1")
        self.right_verticalLayout.addWidget(self.plot_widget_1)
        
        self.plot_widget_2 = QtWidgets.QWidget()
        self.plot_widget_2.setObjectName("plot_widget_2")
        self.right_verticalLayout.addWidget(self.plot_widget_2)
        
        # 4a. 将构建好的右侧布局添加到主水平布局中
        self.main_horizontalLayout.addLayout(self.right_verticalLayout)

        # 5. 设置主窗口的中心部件
        MainWindow.setCentralWidget(self.centralwidget)

        # 6. 添加菜单栏和状态栏
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "能耗查询客户端"))
        self.label.setText(_translate("MainWindow", "月份"))
        self.label_2.setText(_translate("MainWindow", "时间(0.0~23.5)"))
        self.query_button.setText(_translate("MainWindow", "查询"))